Ext.define('TS.view.base.UserAuthority', {
    extend: 'Ext.panel.Panel',
    alias : 'widget.userauthority',
    margins : '0 0 -1 1',
    title : '用户管理',
    layout:'fit',
    hideBorders: true,
    bodyPadding:0,
    initComponent: function() {
    	//创建角色列表,设置只能点复选框选择行
    	var rlst=Ext.create('TS.view.base.RolesList',{ 
                	autoScroll :true,
        			closable:false                			
	             });
	    rlst.getSelectionModel().checkOnly=true;
	    var mlst=Ext.create('TS.view.base.ResourcesList',{
                	autoScroll :true,
        			closable: false
	             });
	    mlst.getSelectionModel().checkOnly=true;
	    var ulst=Ext.create('TS.view.base.UsersList',{
           			autoScroll :true,
        			closable : false
                 });
		 this.items=[{
			xtype: 'form',
			//布局方式  
			layout:{  
			    type:'hbox',  
				align : 'stretch', 
				pack  : 'start'  
			},  
			defaults:{  
		   		 //子元素平均分配宽度  
		    	flex:1,
		    	xtype:'panel',
            	layout:'fit',
            	closable : false
            	//Ext.get("content").getHeight()
		    },
		    tbar :[
				{xtype:'button',action:'add',text:'添加',iconCls:'bill-add-button'},
				{xtype:'button',action:'upd',text:'修改',iconCls:'bill-edit-button'},
				{xtype:'button',action:'del',text:'删除',iconCls:'bill-delete-button'},
				{xtype:'button',action:'rolesq',text:'用户角色授权',iconCls:'bill-uskey-button'},
				/*{xtype:'button',action:'invadd',text:'存货地址',iconCls:'bill-inv-button'},*/
				{xtype:'button',action:'userdept',text:'所属部门',iconCls:'main-menu-hr'}	
			],
            items:[
             {
				items:[ulst]
	         },{
	            items:[rlst]
	 		 },{
	            items:[mlst]
			 }]
    	}],
        this.callParent(arguments);
    }
});